home *** CD-ROM | disk | FTP | other *** search
- global gDBPictObjList
-
- on ResizeLayOutScreen
- if the width of sprite 1 = 640 then
- size = 1
- else
- size = 2
- end if
- SizeWindowArt(size)
- SizeMIAW(size)
- updateStage()
- end
-
- on SizeWindowArt size
- MyObj = getaProp(gDBPictObjList, GetObjProp())
- SetPuppetState([1, 3], #c, 1)
- BorderRect = GetBorderRect(MyObj, size)
- set the rect of sprite 1 to BorderRect
- set the rect of sprite 2 to BorderRect + rect(1, 1, -1, -1)
- xMemberNum = the number of member getAt(["doc min", "doc max"], size)
- set the member of sprite 3 to member(xMemberNum)
- set the rect of sprite 3 to rect(0, 0, member(xMemberNum).width, member(xMemberNum).height)
- SpriteList = GetSpriteList(MyObj)
- ButtonList = GetButtonList(MyObj)
- repeat with rc in ButtonList
- buttonLoc(rc, size)
- end repeat
- end
-
- on SizeMIAW size
- if count(the windowList) > 0 then
- MyObj = getaProp(gDBPictObjList, GetObjProp())
- windowName = (the activeWindow).name
- MyRect = window(windowName).rect
- if size = 1 then
- l = getAt(MyRect, 1)
- t = getAt(MyRect, 2)
- else
- l = getAt((the stage).rect, 1)
- t = getAt((the stage).rect, 2) + 26
- end if
- window(windowName).rect = GetBorderRect(MyObj, size) + rect(l, t, l, t)
- end if
- end
-
- on GetSize
- if the width of sprite 1 < 640 then
- size = 1
- else
- size = 2
- end if
- return size
- end
-